//  采购任务列表 api

import { ajaxService } from '@/utils/request';

const env = import.meta.env;
let baseURL = env.VITE_BUY_URL;

// 新增付款
export function postPurchaseOrderPay(data: any) {
  return ajaxService({
    url: '/purchase/list/order/pay',
    data,
    method: 'post',
    baseURL,
  });
}

// 获取付款
export function getPurchaseOrderPay(params: any) {
  return ajaxService({
    url: '/purchase/list/order/pay',
    params,
    method: 'get',
    baseURL,
  });
}

// 删除付款
export function delPurchaseOrderPay(params: any) {
  return ajaxService({
    url: '/purchase/list/order/pay',
    params,
    method: 'delete',
    baseURL,
  });
}

// 编辑付款
export function putPurchaseOrderPay(data: any) {
  return ajaxService({
    url: '/purchase/list/order/pay',
    data,
    method: 'put',
    baseURL,
  });
}

// 新增发票
export function postPurchaseOrderRecord(data: any) {
  return ajaxService({
    url: '/purchase/list/order/record',
    data,
    method: 'post',
    baseURL,
  });
}

// 获取发票
export function getPurchaseOrderRecord(params: any) {
  return ajaxService({
    url: '/purchase/list/order/record',
    params,
    method: 'get',
    baseURL,
  });
}

// 删除发票
export function delPurchaseOrderRecord(params: any) {
  return ajaxService({
    url: '/purchase/list/order/record',
    params,
    method: 'delete',
    baseURL,
  });
}

// 编辑发票
export function putPurchaseOrderRecord(data: any) {
  return ajaxService({
    url: '/purchase/list/order/record',
    data,
    method: 'put',
    baseURL,
  });
}
